import { _decorator, Component, log, Node, tween, UIOpacity, v2, v3, Vec3 } from 'cc';
import { ZTool } from './Manager/ZTool';
const { ccclass, property } = _decorator;

@ccclass('SingleMoney')
export class SingleMoney extends Component {
    start() {
        // this.node.angle = ZTool.getRandom(0, 360);
        tween(this.node)
            .to(0.5, { position: v3(this.node.position.x + ZTool.getRandom(-120, 120), this.node.position.y + ZTool.getRandom(-120, 120)) })
            .start()
        tween(this.node.getComponent(UIOpacity))
            .to(0.5, { opacity: 100 })
            .start()
    }

    update(deltaTime: number) {

    }
}


